From: Matthias Clasen Date: Thu, 24 Sep 2015 17:31:07 +0000 (-0400) Subject: Check error of g_dbus_proxy_new_sync call X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1179 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=18c713823719c9876a9824ba4bd0ba5c41cc07be;p=gnome-shell.git Check error of g_dbus_proxy_new_sync call Otherwise errors pile up and we crash later on. --- diff --git a/src/main.c b/src/main.c index b33d4bfdc..e8ac998cb 100644 --- a/src/main.c +++ b/src/main.c @@ -132,6 +132,12 @@ shell_dbus_init (gboolean replace) NULL, /* cancellable */ &error); + if (!bus) + { + g_printerr ("Failed to get a session bus proxy: %s", error->message); + exit (1); + } + request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT; if (replace) request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;